﻿<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge chrome=1">
    <title>综合信息服务平台</title>
    <link href="static/css/comm.css?time=20211129" rel="stylesheet" type="text/css">
    <link href="static/css/iconfont.css" rel="stylesheet">
    <link href="static/css/style.css" rel="stylesheet" type="text/css">
    <link href="static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />

    <script src="static/js/jquery.min.js"></script>
    <script src="static/js/jquery.cookie.js"></script>
    <script src="static/js/changeColor.js"></script>
    <script src="static/js/layer.js"></script>
    <script src="static/js/iconfont.js"></script>
    <script src="static/lib/bootstrap/js/bootstrap.min.js"></script>

    <link href="static/lib/dialog/dialog.css" rel="stylesheet" />
    <script src="static/lib/dialog/dialog.js"></script>
    <script src="static/js/store.js"></script>
    <script src="static/js/common.js"></script>
    <script src="static/js/luomingui.js"></script>
    <link href="static/css/color4.css?time=20211129" rel="stylesheet" type="text/css" id="cssfile">
    <style>
        /* ==============================================================
             # Login Register
        =================================================================== */
        .default-padding {
            padding-top: 100px;
        }

        .login-area {
        }

        .login-area form.white-popup-block {
            box-shadow: 0 5px 30px 0 rgba(214, 215, 216, 0.57);
            width: auto;
        }

        form.white-popup-block {
            background: #ffffff none repeat scroll 0 0;
            border-radius: 5px;
            margin: auto;
            overflow: hidden;
            padding: 50px 30px;
            position: relative;
            width: 50%;
        }

        form.white-popup-block li {
            display: inline-block;
            float: left;
            margin-bottom: 5px;
            margin-right: 5px;
            background: #002147 none repeat scroll 0 0;
        }

        form.white-popup-block li a {
            background: #002147 none repeat scroll 0 0;
            border: medium none;
            border-radius: 50%;
            color: #ffffff;
            display: inline-block;
            font-size: 16px;
            height: 50px;
            line-height: 53px;
            text-align: center;
            width: 50px;
        }

        form.white-popup-block .col-md-6:last-child {
            border-left: 1px solid #e7e7e7;
        }

        form.white-popup-block .col-md-6:last-child {
            border-left: 1px solid;
        }

        form.white-popup-block h3, form.white-popup-block h4 {
            font-weight: 500;
            margin-bottom: 20px;
            text-transform: capitalize;
        }

        form.white-popup-block .login-social {
            padding-right: 30px;
            height: 379px;
        }

        form.white-popup-block .login-custom {
            border-left: 1px solid #e7e7e7;
            padding-left: 30px;
        }

        form.white-popup-block input {
            border: 1px solid #e7e7e7;
            box-shadow: inherit;
        }

        form.white-popup-block .lost-pass-link {
            float: right;
        }

        form.white-popup-block .lost-pass-link:hover {
            text-decoration: underline;
        }

        form.white-popup-block label {
            float: left;
        }

        form.white-popup-block label input {
            float: left;
            margin-right: 5px;
            min-height: 20px;
        }

        .new_student {
            font-size: 14px;
            font-family: "Microsoft YaHei UI";
            color: #666;
            line-height: 23px;
            width: 100%;
            margin: 0 0;
            box-sizing: border-box;
            float: left;
        }

        .browser {
            box-sizing: border-box;
            color: #666;
            font-family: "Microsoft YaHei UI";
            font-size: 14px;
            width: 100%;
        }

        .browser a {
            background-repeat: no-repeat;
            color: #666;
            font-family: "Microsoft YaHei UI";
            font-size: 12px;
            height: 18px;
            line-height: 18px;
            margin: 4px 0 0 10px;
            padding: 0 0 0 25px;
        }

        .ie_pic {
            background-image: url(static/img/ie-pic.png);
        }

        .firefox_pic {
            background-image: url(static/img/firefox-pic.png);
        }

        .google_pic {
            background-image: url(static/img/google-pic.png);
        }
    </style>
</head>
<body class="blueColor">
    <input type="hidden" id="roleId" value="1">
    <div class="mainBody">
        <!-- header -->
        <header id="header" class="time_first">
            <div class="logo"><a href="/"><img src="static/img/logo.png"></a></div>
            <div class="top_nav">

            </div>
        </header>


        <!-- Start Login
        ============================================= -->
        <div class="login-area default-padding justify-content-center">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <form action="#" id="login-form" class="white-popup-block" autocomplete="off">
                            <div class="col-md-8 login-social">
                                <div style="text-align: center; overflow:hidden;">
                                    <img src="static/img/login-img.png" style="width: 500px;height: 400px;" />
                                </div>
                            </div>
                            <div class="col-md-4 login-custom">
                                <h4>综合信息服务平台</h4>
                                <div class="col-md-12">
                                    <div class="row">
                                        <div class="form-group">
                                            <label for="username">用户名</label>
                                            <input id="username" name="username" class="form-control" autocomplete="off" placeholder="请输入用户名*" type="text" />
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="row">
                                        <div class="form-group">
                                            <label for="password">密码</label>
                                            <input id="password" name="password" class="form-control" autocomplete="off" placeholder="请输入密码*" type="password" />
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="row">

                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="row">
                                        <button id="login_button" type="button" class="btn btn-primary" style="width:99.9%;">
                                            登录
                                        </button>
                                    </div>
                                </div>
                                <p class="link-bottom">
                                <p class="new_student" style="margin-top:10px;">
                                    <span>温馨提示：</span>学生账号为学号，教职工账号为职工号
                                </p>
                                <p class="browser">
                                    <span class="left">建议浏览器：</span>
                                    <a class="ie_pic" target="_blank" href="https://browser.360.cn/eex/index.html?channel=7">360</a>
                                    <a class="firefox_pic" target="_blank" href="http://www.firefox.com.cn/download/">火狐</a>
                                    <a class="google_pic" target="_blank" href="https://www.google.cn/intl/zh-CN/chrome/">谷歌</a>
                                </p>
                                </p>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Login Area -->
        <footer class="footer"><p>©2021 一站式网上服务大厅</p></footer>

    </div>


    <script type="text/javascript">
        var defurl = '/admin/index.html';
        $(function () {
            var type = $.request("type");
            if (type == "out") {
                $.cookie("userid", "", { path: "/", expiress: 7 });
            }
            $('#login_button').on('click', function () {
                JsLogin();
            });
            var userid = $.cookie("userid");
            if (!!userid) {
                location.href = defurl;
            }
            $(document).keydown(function (e) {
                var curKey = e.which;
                if (curKey == 13) {
                    JsLogin();
                }
            });
        });
        function JsLogin() {
            var $username = $("#username");
            var $password = $("#password");
            if ($username.val() == "" || $username.val() == "用户名") {
                $username.focus();
                $.modalMsg("*请输入用户名。", "warning");
                return false;
            } else if ($password.val() == "") {
                $password.focus();
                $.modalMsg("*请输入密码。", "warning");
                return false;
            } else {
                $("#login_button").attr('disabled', 'disabled').html("loading...");
                $.ajax({
                    url: "/api/Auth/Gettoken",
                    type: 'post',
                    contentType: 'application/json',
                    data: JSON.stringify({ loginID: $.trim($username.val()), loginPwd: $.trim($password.val()) }),
                    success: function (obj) {
                        var ret = JSON.parse(obj);
                        if (ret.state == "success") {
                            $.cookie("userid", $username.val(),{path:"/",expiress:7});
                            window.LS.set("lmgcmstoken", ret.data);
                            location.href = defurl;
                        } else {
                            $.modalMsg(ret.message, "warning");
                            $("#login_button").removeAttr('disabled').html("登录");
                        }
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        $("#login_button").removeAttr('disabled').html("登录");
                    }
                });
            }
        }
    </script>

</body>
</html>